<?php 
session_start();  
if($_SESSION['user'])
{
require_once("dbconnect.php");
$id=$_SESSION['user'];
//echo $id;
$sql="select * from executives where exe_name='$id';";
$result=mysql_query($sql);
while($row=mysql_fetch_assoc($result))
{
$name=$row['exe_name'];
//echo $name;
$id=$row['id'];
}
}
else 
{
header("Location:login.php");  
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>admin</title>
<link href="images/kk.css" rel="stylesheet" type="text/css" />
</head>

<body>
<div id="main">
  <div class="header">
    <div class="logo"><img src="images/logo.jpg" /></div>
    <div class="logout"><a href="logout.php" style="text-decoration:none">Logout<img src="images/logout.jpg" width="15" height="15" class="logout-icon" /></a></div>
  </div>
  <div class="banner"><img src="images/banner.jpg" /></div>
<div class="content">
    <div class="welcome-box">
      <div class="left"><img src="images/left.jpg" /></div>
      <div class="welcome">
        <div class="welcome-text-left">Welcome: <?php echo $name;?></div>
        <div class="welcome-text-right">Last Login: <?php 
 $date= $_SESSION['last_login']; 
 //echo $date;
 list($year,$month,$day,$hour,$minute,$seconds)=split('[- :]',$date);
    echo $day."-".$month."-".$year."  ".$hour.":".$minute.":".$seconds;
  
?></div>
      </div>
      <div class="right"><img src="images/right.jpg" /></div>
    </div>
    
    <div class="boxes">
     <a href="adminsearch.php"> <div class="box">
        <div class="icon"><img src="images/reports.jpg" /></div>
        <div class="icon-header">Report<br />
        <span class="icon-text">We give you our daily call report </span></div>
        <br />
      </div></a><div class="box">
        <div class="icon"><img src="images/sales-info.jpg" /></div>
        <div class="icon-header">Sales Info<br />
        <span class="icon-text">About our sales information </span></div>
        <br />
      </div>
      <div class="box">
        <div class="icon"><img src="images/expense-management.jpg" /></div>
        <div class="icon-header">Expense Management<br />
        <span class="icon-text">Our costing info </span></div>
        
      </div>
      <div class="box">
        <div class="icon"><img src="images/dashboard.jpg" /></div>
        <div class="icon-header">Dashboard<br />
        <span class="icon-text">Growth of our company </span></div>
        
      </div>
        <div class="box">
        <div class="icon"><img src="images/messages.jpg" /></div>
        <div class="icon-header">Messages<br />
        <span class="icon-text">Viewers openions </span></div>
        <br />
      </div><div class="box">
        <div class="icon"><img src="images/phonebook.jpg" /></div>
        <div class="icon-header">Phone Book<br />
        <span class="icon-text">Costomers contact information </span></div>
        <br />
      </div>
      <div class="box">
        <div class="icon"><img src="images/myprofile.jpg" /></div>
        <div class="icon-header">My Profile<br />
        <span class="icon-text">Costomers personal profile </span></div>
        
      </div>
      <div class="box">
        <div class="icon"><img src="images/user.jpg" width="60" height="58" /></div>
        <div class="icon-header">Users<br />
        <span class="icon-text">Our news letters </span></div>
        
      </div>
    </div>
  </div>
  
  <div class="footer">Copy Rights Reserved to Advaith Soft</div>
</div>
</body>
</html>
